# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-qt5integration
pkgver=5.6.6
_commit=ed6366a44d6fff5534f1e1eda341134e16963626
pkgrel=2
pkgdesc='Qt platform theme integration plugins for DDE'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/qt5integration"
license=('GPL3')
depends=('dtkwidget' 'kiconthemes' 'libqtxdg' 'deepin-qt5platform-plugins')
makedepends=('git' 'xcb-util-renderutil' 'deepin-file-manager' 'gtest')
groups=('deepin')
source=("git+https://github.com/linuxdeepin/qt5integration.git#commit=$_commit")
sha512sums=('SKIP')

prepare() {
  cd qt5integration
  # Use kiconthemes to correctly load dsvg plugins
  # https://github.com/linuxdeepin/qt5integration/pull/129
  git cherry-pick -n 822a6a40cddca1c89cc06169e42828b86c6f5a80
}

build() {
  cd qt5integration
  qmake-qt5 PREFIX=/usr
  make -j1
}

package() {
  cd qt5integration
  make INSTALL_ROOT="$pkgdir" install
}
